#ifndef _BG_BIPED_H_
#define _BG_BIPED_H_

namespace bones
{
	class BipedInstance;
}
#include "bg_element.h"

namespace background
{
class	BGBiped : public BGElement
{
public:
							BGBiped(BGScene*	pScene);
	virtual					~BGBiped();
	virtual void			Render(const math::Vec2& Offset, float	Scale) ;
	virtual void			Tick(float dt);
	virtual void			Load(LuaPlus::LuaObject& Obj);
	virtual void			Save(script::WriteLua* pWL);
	virtual void			SetAnimation(const std::string& File);
	virtual void			RecalcBoundingBox();
	bones::BipedInstance*	GetBiped() { return m_pBiped; };
	virtual void			FlushImages();
	virtual const char*		GetName()  { return m_Biped.c_str(); };

	virtual void			OnElementReset();

protected:
	virtual	void			CopyData(BGElement*	pFrom)
	{
		BGElement::CopyData(pFrom);
		m_Biped = ((BGBiped*)pFrom)->m_Biped;		
	}
	bones::BipedInstance*	m_pBiped;
	std::string				m_Biped;
};

}  // namespace background

#endif // _BG_BIPED_H_